package org.shangda.wechat.pet.util;


/**
 * @Description: 常量类
 * @Author: Jason.zhu
 * @Create: 2019/08/12 10:26
 */

public class Constants {

    /**
     * api接口的token header key
     */
    public static final String D1M_TOKEN = "d1mtoken";


    /**
     * 4小时常量
     */
    public static final Long FOUR_HOURS = 4 * 60 * 60 * 1000L;


    /**
     * 一天的毫秒数
     */
    public static final Long ONE_DAY = 24 * 60 * 60 * 1000L;

    /**
     * 2秒的毫秒数
     */
    public static final Long TWO_SECONDS = 2 * 1000L;

    /**
     * 2分钟的毫秒数
     */
    public static final Long TWO_MINUTES = 2 * 60 * 1000L;

    /**
     * 数字 0
     */
    public static final Integer ZERO = 0;

    /**
     * 后台登录超时 单位小时
     */
    public static final long USER_EXPIRE_TIME = 2;


    /**
     * 没有权限码
     */
    public static final String NO_AUTH = "401";


    //未来图片目录
    public static final String FUTURE_WEATHER_DIR = "miniapp/future_weather";
    //首页图片目录
    public static final String INDEX_WEATHER_DIR = "miniapp/index_weather";
    //今天图片目录
    public static final String TODAY_WEATHER_DIR = "miniapp/current_weather";
    //游记图片目录
    public static final String TOURIST_NOTE_IMAGE_DIR = "tourist_note_image";
    //游记详情小程序码目录
    public static final String TOURIST_NOTE_MINIAPP_CODE_DIR = "tourist_note_miniapp_code";
    //商品图片目录
    public static final String PRODUCT_IMAGE_DIR = "product";
    //会员头像图片目录
    public static final String MEMBER_HEADER_IMG_DIR = "member_header_img";
    //核销二维码
    public static final String QRCODE_IMAGE_DIR = "qrcode";
    //首页轮播图存放目录
    public static final String INDEX_HOME_PAGE_DIR = "miniapp/index_home_page";
    //会员绑定活动分销员二维码存放目录
    public static final String MEMBER_BIND_CAMPAIGN_QRCODE_DIR = "member_bind_campaign_qrcode";
    //活动图片目录
    public static final String CAMPAIGN_DIR = "campaign";

    /**
     * 小程序使用到的常量
     */
    //小程序请求接口head token key
    public static final String YOUNGOR_ZOO_MP_HEADER_KEY_TOKEN = "token";
    //小程序存放登录会员的session key
    public static final String MINIAPP_MEMBER = "memberSimpleInfo:";
    //小程序登录超时
    public static final long MINIAPP_LOGIN_EXPIRE_TIME = 2;
    //ITBOY天气接口成功code
    public static final Integer ITBOY_WEATHER_SUCCESS_CODE = 200;

    //隐私条款配置Key
    public static final String PRIVACY_POLICY_CFG_KEY = "PRIVACY_POLICY";
    //销售条款配置Key
    public static final String SALE_POLICY_CFG_KEY = "SALE_POLICY_CFG_KEY";
    //天气来源 配置key
    public static final String WEATHER_SOURCE_CFG_KEY = "WEATHER_SOURCE";
    //订单时间段 配置 key
    public static final String ORDER_TIME_DURATION_CFG_KEY = "ORDER_TIME_DURATION";

    //订单同步给智游宝失败邮件标题
    public static final String ORDER_SYNC_FAIL_EMAIL_TITLE_CFG_KEY = "ORDER_SYNC_FAIL_EMAIL_TITLE";
    //订单同步给智游宝失败邮件内容
    public static final String ORDER_SYNC_FAIL_EMAIL_CONTENT_CFG_KEY = "ORDER_SYNC_FAIL_EMAIL_CONTENT";
    //发件箱用户名
    public static final String SENDER_MAIL_USERNAME_CFG_KEY = "SENDER_MAIL_USERNAME";
    //发件箱密码
    public static final String SENDER_MAIL_PASSWORD_CFG_KEY = "SENDER_MAIL_PASSWORD";
    //订单同步给智游宝失败收件人邮箱
    public static final String ORDER_SYNC_FAIL_EMAIL_RECEIVES_CFG_KEY = "ORDER_SYNC_FAIL_EMAIL_RECEIVES";


    //首页天气图片名称前缀
    public static final String INDEX_WEATHER_IMAGE_NAME_PRE = "首页_";
    //今天天气图片名称前缀
    public static final String TODAY_WEATHER_IMAGE_NAME_PRE = "当天_";
    //订单支付超时时间  单位分
    public static final Integer  ORDER_PAY_TIME_OUT_MINITE = 30;
    //订单联系人姓名
    public static final String  ORDER_LINK_USER_NAME = "雅戈尔动物园";
    //默认商品订单时间段
    public static final String  DEFAULT_ORDER_TIME_DURATION = "9:00-11:00";

    //首页轮播图配置页code
    public static final String  INDEX_HOME_PAGE_CONFIG_CODE = "INDEX_HOME_PAGE";
    //游记小程序码宽度
    public static final Integer TOURIST_NOTE_MINIAPP_CODE_WIDTH = 312;
    //会员绑定活动分销员二维码宽度
    public static final Integer MEMBER_BIND_CAMPAIGN_SA_QRCODE_WIDTH = 258;
    //会员绑定活动分销员二维码高度
    public static final Integer MEMBER_BIND_CAMPAIGN_SA_QRCODE_HEIGHT = 258;



    /**
     * 智游宝 支付方式值 spot现场支付 vm备用金，zyb智游宝支付，默认使用vm
     */
    public static final String ZHIYOUBAO_PAY_METHOD_VM = "vm";
    public static final String ZYB_AUDIT_STATUS_FAILURE = "failure";
    public static final String ZYB_AUDIT_STATUS_SUCCESS = "success";
    public static final Integer REAL_NAME_TICKET_CART_MAX_QUANTITY = 10; //实名票购物车数量最大10个
    public static final Integer CART_MAX_QUANTITY = 999; //非实名商品购物车数量最大999个
    public static final String YINZHOU_CITIY_NAME = "鄞州"; //鄞州城市名称

    public static final String ALL_PRODUCT_NAME = "所有商品"; //所有商品名称

    public static final String  DEFAULT_SHARE_IMG_CODE = "default"; //默认分享code
    public static final String  DEFAULT_SHARE_IMG_SA = "default"; //默认分享sa



    /**
     * 后台管理系统使用的常量
     */
    //小程序请求接口head token key 需要使用驼峰，不能带有下划线
    public static final String YOUNGOR_ZOO_BACKEND_HEADER_KEY_TOKEN = "backendToken";


    /**
     * Redis key
     */
    public static final String YOUNGOR_ZOO_REDIS_KEY_PREFIX = "youngorzoo:";
    public static final String MINIAPP_SESSION_KEY_PRE = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "miniapp_session_key:";//小程序登录的后的key
    public static final String BACKEND_SESSION_KEY_PRE = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "backend_session_key:";//后台管理系统登录的后的key
    public static final String CURRENT_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "current_weather:"; //当前天气缓存Key
    public static final String FULL_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "full_weather:"; //当前天气缓存Key
    public static final String FORECAST_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "forecast_weather:"; //当前天气缓存Key

    public static final String NBQX_CURRENT_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "nbqx_current_weather:"; //当前天气缓存Key
    public static final String NBQX_FORECAST_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "nbqx_forecast_weather:"; //当前天气缓存Key

    public static final String YZSTATION_CURRENT_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "yzstation_current_weather:"; //动物园基站当前天气缓存Key
    public static final String YZSTATION_FORECAST_WEATHER_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "yzstation_forecast_weather:"; //动物园基站未来天气缓存Key

    public static final String CONFIG_REDIS_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "config:"; //系统配置表

    /**
     * redis lock key prefix
     */
    public static final String ADD_CART_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "addcart:"; //添加购物车lock key
    public static final String DEL_CART_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "delcart:"; //删除购物车lock key
    public static final String MODIFY_CART_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "modifycart:"; //修改购物车lock key
    public static final String SETTLE_ACCOUNT_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "settleaccount:"; //修改购物车lock key
    public static final String CREATE_ORDER_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "createorder:"; //添加订单lock key
    public static final String PAYORDER_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "payorder:"; //支付订单lock key
    public static final String WXPAYMESSAGE_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "wxpaymessage:"; //处理微信支付消息lock key
    public static final String ZYB_CREATEORDER_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "zybcreateorder:"; //处理智游宝创建订单微信消息lock key
    public static final String CREATE_REFUND_ORDER_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "createrefundorder:"; //添加退票单lock key
    public static final String ZYB_CREATEREFUNDORDER_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "zybcreaterefundorder:";
    public static final String WXREFUNDMESSAGE_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "wxrefundmessage:"; //处理微信支付结果消息lock key
    public static final String ZYB_NOTIFY_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "zybnotify:"; // 智游宝通知锁锁
    public static final String PRODUCT_ADD_UPDATE_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "productaddupdate:";
    public static final String PRODUCT_SKU_ADD_UPDATE_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "productskuaddupdate:"; // 商品sku更新锁
    public static final String TOURIST_NOTE_ADD_UPDATE_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "touristnoteaddupdate:"; // 游记更新锁
    public static final String CANCEL_UNPAY_ORDER_REDIS_LOCK_KEY_PREFIX = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "cancelunpayorder:"; //取消未支付订单锁
    public static final String YOUNGOR_ZOO_MIINAPP_ACCESSTOKEN = YOUNGOR_ZOO_REDIS_KEY_PREFIX + "miinappaccesstoken:"; //取消未支付订单锁

}
